

from frontend.roleApplication import RoleApplication
from frontend.form import Type

class ShipperApplication(RoleApplication):

    def __init__(self):
        super(ShipperApplication, self).__init__("RugsWorkflow", "Shipper") # use actual work flow name and role name
        
        # specify actual task name and name_fields:
        self.register_sink_step("ShipOrder", self.ship_order_form_creator, name_fields=["sequence", "FullName"])

    def ship_order_form_creator(self, stepname, form):
       
        form.add_task_label(fields=["FullName"]) # use one or more fields from order to define label
        #  add any static labels or fields you want to include in this form
        
#        for key in form.task.data.keys():
#            print key
        

if __name__ == '__main__':
    app = ShipperApplication()
    app.MainLoop()